import React, { Component, PureComponent } from 'react';
import { StyleSheet, Text, View, Button, DeviceEventEmitter } from 'react-native';
import styles from 'src/styles';

function onRole(navigation, userRole) {
  console.log('on User Role: ', userRole);
  // navigation.navigate('child');
  // navigation.navigate('tab', { tabs: ['home', 'child'], screen: 'child' });
  navigation.navigate('tab', { userRole });
};

function Parent2({ navigation }) {
  return (
    <View style={styles.container}>
      <Text>Parent2</Text>
      {/* <Button title='Parent Role' onPress={() => { onRole(navigation, 'parent') }} />
      <Button title='Child Role' onPress={() => { onRole(navigation, 'child') }} /> */}
    </View>
  )
}

export default Parent2;
